home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-11-18 | 54.8 KB | 1,552 lines | [ TEXT/MPS ]
C.S.M.P. Digest Sun, 08 Mar 92 Volume 1 : Issue 2 Today's Topics: Is (any version of) ResEdit Public Domain? If so, how do I get it? Why would Lsearch Fail? Differences between Think C and MPW C Hierarchical Menus in Think C and TCL Beta test available - DarkSide 3.0 TCP/IP Library for Macintosh Calling SndDoCommand at interrupt time Making Folders Putting the drive to sleep on a powerbook CWindowPtr or WindowPtr ? Trashing menu bar Command Mac database format? Sockets lib wanted for MacTCP Quickdraw - PICT question Auto Pop (why?) MS Mail XCMDs or Externals? ERead() completion woes The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly. These digests are available (by using FTP, account anonymous, your email address as password) in the pub/mac directory on ftp.cs.uoregon.edu. This is also the home of the comp.sys.mac.programmer Frequently Asked Questions list. The articles in these digests are taken directly from comp.sys.mac.programmer. They are not edited; all articles included in this digest are in their original posted form. The only articles that are -not- included in these digests are those which didn't receive any replies (except those that give information rather than ask a question). All replies to each article are concatenated onto the original article in the order in which they were received. Article threads are not added to the digests until the last article added to the thread is at least one month old (this is to ensure that the thread is dead before adding it to the digests). Send administrative mail to mkelly@cs.uoregon.edu. ------------------------------------------------------- From: tony@scotty.dccs.upenn.edu (Anthony Olejnik) Subject: Is (any version of) ResEdit Public Domain? If so, how do I get it? Date: 23 Jan 92 14:11:29 GMT Organization: University of Pennsylvania I squeezed my questions into the subject line. I`d like to obtain a copy and give it out to my friends (but only if its Public Domain). I saw in a store what looks like a book on ResEdit which contains the application. However, I'm not sure if the application is Public Domain or not. Any help would be greatly appreciated. Thanks in advance. --tony - ------------------------- From: e-sink@uiuc.edu (Eric W. Sink) Subject: Is (any version of) ResEdit Public Domain? If so, how do I get it? Date: 23 Jan 92 16:16:15 GMT Organization: University of Illinois at Urbana-Champaign In <63359@netnews.upenn.edu> tony@scotty.dccs.upenn.edu (Anthony Olejnik) writes: >I`d like to obtain a copy and give it out to my friends >(but only if its Public Domain). >I saw in a store what looks like a book on ResEdit which >contains the application. However, I'm not sure if the >application is Public Domain or not. ResEdit is not public domain. Public domain means devoid of copyright. ResEdit is copyrighted. It is also freely available by anon ftp from ftp.apple.com. This does not mean you can give copies away, nor does it mean you cannot. There is a license agreement in the package. Read it carefully. -- Eric W. Sink, Spatial Analysis and Systems Team USACERL, P.O. Box 9005, Champaign, IL 61826-9005 1-800-USA-CERL x449, e-sink@uiuc.edu --------------------------- From: mxmora@unix.sri.com (Matthew Xavier Mora) Subject: Why would Lsearch Fail? Date: 23 Jan 92 01:07:14 GMT Organization: SRI International I'm having problems with the list manager. Anytime lsearch is called it seem to never find the string? Anyone run into this? Is the list somehow trashed? Thanks for any info you can give. -- +----------------------------------------------------------------------------+ |Matthew Xavier Mora mxmora@unix.sri.com | |SRI International Matt_Mora@qm.sri.com | | | | sent using NewsWatcher version 1.0.3.b2(mxm) | +----------------------------------------------------------------------------+ - ------------------------- From: merk@aerospace.aero.org Subject: Why would Lsearch Fail? Date: 23 Jan 92 17:47:01 GMT Organization: The Aerospace Corporation In article <31584@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes: >I'm having problems with the list manager. Anytime lsearch is called >it seem to never find the string? Anyone run into this? Is the list >somehow trashed? > >From IM: LSearch searches for the first cell greater than or equal to theCell that contains the specified data. I had this problem when I forgot to initialize theCell before using it. It was a simple mistake but cost me a lot of heartache! This is especially a problem if you are upgrading from THINK 4.x to 5.x because theCell changed from a long to a Point. - ------------------------- From: mxmora@unix.SRI.COM (Matt Mora) Subject: Why would Lsearch Fail? Date: 23 Jan 92 21:29:26 GMT Organization: SRI International, Menlo Park, CA In article <1992Jan23.174701.26346@speedy.aero.org> merk@aerospace.aero.org writes: >In article <31584@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) >writes: >>I'm having problems with the list manager. Anytime lsearch is called >>it seem to never find the string? Anyone run into this? Is the list >>somehow trashed? >From IM: > LSearch searches for the first cell greater than or equal to theCell >that contains the specified data. >I had this problem when I forgot to initialize theCell before using it. >It was a simple mistake but cost me a lot of heartache! This is especially >a problem if you are upgrading from THINK 4.x to 5.x because theCell changed >from a long to a Point. Wouldn't the compiler complain about the type difference? I have the compiler (TC 5.0.x) set to ansi compatible mode and the program will compile and run. The problem seems to be with the Search proc included for lsearch. When I trace through the search proc and I get top the call IUMagIDString, it doesn't return a one or a zero. It returns some positive integer. according to IM: "IUEqualString comapares aStr and bStr for equality without regard for secondary ordering, as described above under "international String Comparison". If the strings are equal, it returns 0; otherwise, it returns 1." IM says: "IUMagIDString is the same as IUEqualString except that instead of comparing two Pascal strings, it compares the string defined by aPtr and aLen to the string defined by bPtr and bLen." All the parameters going into IUMagIDString appear to be ok but the result is funny. HELP! Matt -- ___________________________________________________________ Matthew Mora | my Mac Matt_Mora@sri.com SRI International | my unix mxmora@unix.sri.com ___________________________________________________________ --------------------------- From: mxmora@unix.sri.com (Matthew Xavier Mora) Subject: Differences between Think C and MPW C Date: 23 Jan 92 01:13:47 GMT Organization: SRI International What are the differences between MPW and the THINK environments that I should know about. I think some of the problems I'm having with modifying Newswatcher is that NW was originally written for MPW. What options do I have to set in the project to make it compatible with MPW? I'm using TC 5.0.x Thanks Matt -- +----------------------------------------------------------------------------+ |Matthew Xavier Mora mxmora@unix.sri.com | |SRI International Matt_Mora@qm.sri.com | | | | sent using NewsWatcher version 1.0.3.b2(mxm) | +----------------------------------------------------------------------------+ - ------------------------- From: e-sink@uiuc.edu (Eric W. Sink) Subject: Differences between Think C and MPW C Date: 23 Jan 92 16:14:11 GMT Organization: University of Illinois at Urbana-Champaign In <31585@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes: >What are the differences between MPW and the THINK environments >that I should know about. I think some of the problems I'm having with >modifying Newswatcher is that NW was originally written for MPW. What options >do I have to set in the project to make it compatible with MPW? I'm using >TC 5.0.x Well, it's not really possible to just set options to make Think C totally compatible with MPW, but it would be a good idea to consider the following: Turn on 4 byte ints. MPW ints are 4 bytes, along with most of the rest of the world. BTW, when you do this, all your calls to the ANSI library are potential crashes. Therefore, you should make a copy of the ANSI library, and rebuild it with 4 byte ints. I call mine, ANSI-4byte. Keep in mind that Think C ignores the #pragma segment directive. I think there's a section of the Think C manual that talks about porting code from MPW, isn't there ? Not sure... -- Eric W. Sink, Spatial Analysis and Systems Team USACERL, P.O. Box 9005, Champaign, IL 61826-9005 1-800-USA-CERL x449, e-sink@uiuc.edu - ------------------------- From: ross@bnr.ca (Ross Brown) Subject: Differences between Think C and MPW C Organization: Bell-Northern Research Date: Fri, 24 Jan 92 19:11:42 GMT >In <31585@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes: > > >>What are the differences between MPW and the THINK environments >>that I should know about. I think some of the problems I'm having with >>modifying Newswatcher is that NW was originally written for MPW. What options >>do I have to set in the project to make it compatible with MPW? I'm using >>TC 5.0.x Here's one: In MPW, '\n' is 0x0D and '\r' is 0x0A. In Think C and the rest of the C universe, the assignments are the reverse. According to MPW documentation, this is done because TextEdit and other Mac managers regard 0x0D as the newline character. (In earlier versions, '\r' was 0x0D too.) Apparently Think did some extra fiddling to make their assignments work properly. As long as your code does not assume what the values are, your source should be portable. If, however, you have a table mapping ASCII codes to character types, or something like that, you will run into trouble. Ross Brown Bell-Northern Research Ltd. Ottawa, Ontario, Canada ross@bnr.ca Opinions expressed do not necessarily represent those of BNR. --------------------------- From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) Subject: Hierarchical Menus in Think C and TCL Date: 23 Jan 92 16:50:30 GMT Organization: University of Illinois at Urbana I have been unable to get hierarchical menus to work with Think C 5.0.2 and TCL 1.1.2. I have followed the instructions in the Think C manual, and I have followed the example from the Art Class Project (it has hierarchical Font and Size menus), but I still can't get it to work. The problem manifests itself when I have an EditText object as my gopher. When this is the case and update menus tries to do checkmarking to get the handle of any menu, my program crashes. I am really frustrated with this. Please help! Any suggestions would be appreciated. Thanks. -- David M. Marcovitz | internet: marcovitz@uiuc.edu Computer-based Education Research Lab | dmmg1176@uxa.cso.uiuc.edu University of Illinois | novanet: marco / cca / nova - ------------------------- From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) Subject: Hierarchical Menus in Think C and TCL Date: 23 Jan 92 23:34:57 GMT Organization: University of Illinois at Urbana dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) writes: >I have been unable to get hierarchical menus to work with Think C >5.0.2 and TCL 1.1.2. I have followed the instructions in the Think C >manual, and I have followed the example from the Art Class Project (it >has hierarchical Font and Size menus), but I still can't get it to >work. As it turns out, my problem had nothing to do with hierarchical menus. It had to do with using GetSoundVol without including <Sound.h>. I added the #include, and it works fine now. If this was going to cause problems, shouldn't the compiler have warned me? -- David M. Marcovitz | internet: marcovitz@uiuc.edu Computer-based Education Research Lab | dmmg1176@uxa.cso.uiuc.edu University of Illinois | novanet: marco / cca / nova - ------------------------- From: CXT105@psuvm.psu.edu (Christopher Tate) Subject: Hierarchical Menus in Think C and TCL Date: 24 Jan 92 00:10:55 GMT Organization: Penn State University In article <1992Jan23.233457.18544@ux1.cso.uiuc.edu>, dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) says: > >As it turns out, my problem had nothing to do with hierarchical menus. >It had to do with using GetSoundVol without including <Sound.h>. I >added the #include, and it works fine now. If this was going to cause >problems, shouldn't the compiler have warned me? This is what the "Require Prototypes" option is for. Personally, I haven't written any code without it enabled for a long time; I find it's a great way to make yourself stay honest. :-) (I really don't know whether it works correctly with the TCL, though. It had better, otherwise I suspect someone's going to hear about it...) - ----- Christopher Tate | Cryptogram #6: cxt105@psuvm.psu.edu | CXT105@PSUVM.BITNET | DJ TZYOW, JF FJW OYJ - -------------------------------| IWYN SFH TJWWQW. Send me the answer; I love mail! | --------------------------- From: dowdy@apple.com (Tom Dowdy) Subject: Beta test available - DarkSide 3.0 Date: 23 Jan 92 16:19:52 GMT Organization: Apple Computer, Inc. Well, it's almost ready! After much anticipation and work (ugh!) DarkSide of the Mac 3.0 is almost ready for beta test (I have two more faders to finish). Since I'll be finishing up sometime soon (like this weekend), now seems as good a time as any to request beta testers. I'm looking for about 20 folks who are willing to TEST DarkSide 3.0 - and that doesn't mean you install it, run it once, and send me mail saying "It doesn't work."... Testers MUST: - run system 7 currently - use their Mac often (daily, I guess - I use 5 Macs daily, but maybe I'm a bit odd.) - be willing to try to reproduce the bug and find out what makes it happen - be able to give exact state of their system (versions, INITs, apps, etc) - have a mailer that can take large files (100K or more), have some sane internet address that I can easily mail to. - have run DarkSide before, or currently use it. It would be great if you: - Had MORE than one Mac - Had a special kind of Mac (very low end (SE, Plus, Classic) or very high end (4 24 bit boards) ) or run some new software (like A/UX 3.0) - Had programming experience (to test writing new faders and give feedback on the shell) If you are interested, drop me a line saying why you are the greatest beta tester since computers were invented. I'm usually VERY good about responding quickly to e-mail. You should hear back quickly from me either: a) sorry, but I don't think you would be helpful (Not bloody likely) b) great, you're in c) wait, I already have someone, but you might be a better person for a certain test. If you don't hear from me in a week, assume something is amiss and try again. Once the list is full, I'll post a message saying that beta testing is underway. I expect it to take between 2 and 4 weeks - as the code seems pretty stable right now with about a dozen folks here at Apple running it. As soon as testing is complete, I'll be posting DarkSide 3.0 for all to use, and trumpeting its completion far and wide. Then I shall sleep... Tom Dowdy Internet: dowdy@apple.COM Apple Computer MS:81KS UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy 20525 Mariani Ave AppleLink: DOWDY1 Cupertino, CA 95014 "The 'Ooh-Ah' Bird is so called because it lays square eggs." - ------------------------- From: dowdy@apple.com (Tom Dowdy) Subject: DarkSide Beta Testing Closed Date: 23 Jan 92 22:17:24 GMT Organization: Apple Computer, Inc. Wow. 30 minutes after asking for beta testers, my mailbox was flooded with requests. I now have all of the beta tester I think I need. Thank you all for the quick response. Sorry, but I have to turn away the remaining requests. Tom Dowdy Internet: dowdy@apple.COM Apple Computer MS:81KS UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy 20525 Mariani Ave AppleLink: DOWDY1 Cupertino, CA 95014 "The 'Ooh-Ah' Bird is so called because it lays square eggs." --------------------------- From: P.S.Haight@mail.cornell.edu (Peter Haight) Subject: TCP/IP Library for Macintosh Date: 23 Jan 92 18:07:26 GMT Organization: Cornell University I'm looking for a TCP/IP library for the macintosh. I would prefer it in Pascal or C, but will take one in any language. If you know where I can get such a thing, please write me at P.S.Haight@cornell.edu or post a reply here. - -- Peter Haight P.S.Haight@cornell.edu - ------------------------- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett) Subject: TCP/IP Library for Macintosh Date: 23 Jan 92 21:16:24 GMT Organization: University of Illinois at Urbana P.S.Haight@mail.cornell.edu (Peter Haight) writes: >I'm looking for a TCP/IP library for the macintosh. I would prefer it in >Pascal or C, but will take one in any language. If you know where I can >get such a thing, please write me at P.S.Haight@cornell.edu or post a reply >here. It's not a standalong TCP/IP library per se, but one version of NCSA Telnet does its own TCP (we wrote it before MacTCP came out). The source for it (telnet.ncsa) and the MacTCP one (telnet.mactcp) are available from ftp.ncsal.uiuc.edu. The major limitations to our package vs. MacTCP is that only one application at a time can be doing TCP, so you couldn't, for example, write a standalong FTP server using our package unless you never planned to use Telnet which the server was running. You can have multiple connections, of course (telnet.ncsa provides an ftp server in the same program). -- Mark Lanett mlanett@uiuc.edu Software Tools Group, NCSA, University of Illinois at Urbana-Champaign --------------------------- From: gilliam@witch.asel.udel.edu (Dan Gilliam) Subject: Calling SndDoCommand at interrupt time Date: 23 Jan 92 21:28:40 GMT Organization: AI duPont Inst. Does anyone know if SndDoCommand() can be called at interrupt time? Inside Mac VI isn't very clear on the issue. In the Sound Manager chapter, page 34, several routines are listed as not callable at interrupt time. SndDoCommand is _not_ listed among these routines. At the top of the next page, it's explained that "you can safely call all other Sound Manager routines at interrupt time." BUT, at the back of the book, Appendix B, SndDoCommand _is_ listed among the routines that may move or purge memory. Can I call it or not? I can't think of a good reason for SndDoCommand to move/purge memory, but maybe there is one. Why I need to know: I'm trying to use SndDoCommand in a callback routine to ensure that my application can play sounds continuously even while menus are held down. (I do have fairly good reasons for wanting this behavior, weird as it is...) My callback routine causes the sound to glitch/skip, and I'm not sure if this is caused by interrupt problems with SndDoCommand or by something else. Everything plays fine if I queue up the sound commands in my event loop instead, though. If anyone can suggest another way to do this, I'd appreciate it muchly! Thanks in advance, Dan Gilliam (CS grad student at Univ. of Del.) <gilliam@asel.udel.edu> - ------------------------- From: REEKES@applelink.apple.com (Jim Reekes) Subject: Calling SndDoCommand at interrupt time Date: 30 Jan 92 00:27:51 GMT Organization: Apple Computer, Inc. In article <73258@nigel.ee.udel.edu>, gilliam@witch.asel.udel.edu (Dan Gilliam) writes: > > Does anyone know if SndDoCommand() can be called at interrupt time? > Inside Mac VI isn't very clear on the issue. In the Sound Manager chapter, > page 34, several routines are listed as not callable at interrupt time. > SndDoCommand is _not_ listed among these routines. At the top of the next > page, it's explained that "you can safely call all other Sound Manager > routines at interrupt time." > > BUT, at the back of the book, Appendix B, SndDoCommand _is_ listed among > the routines that may move or purge memory. Can I call it or not? > I can't think of a good reason for SndDoCommand to move/purge memory, > but maybe there is one. > > Why I need to know: > I'm trying to use SndDoCommand in a callback routine to ensure that my > application can play sounds continuously even while menus are held down. > (I do have fairly good reasons for wanting this behavior, weird as it is...) > My callback routine causes the sound to glitch/skip, and I'm not sure if > this is caused by interrupt problems with SndDoCommand or by something else. > Everything plays fine if I queue up the sound commands in my event loop > instead, though. SndDoCommand may move or purge memory because you can send some commands that will cause memory allocation. That's why it's listed in Appendix B. You can issue another bufferCmd within your callBackProc. That's exactly what QuickTime does. - ----------------------------------------------------------------- Jim Reekes, E.O. | Macintosh Toolbox Engineering | Sound Manager Expert Apple Computer, Inc. | All opinions expressed are mine, and 20525 Mariani Ave. MS: 81-EQ | do not necessarily represent those Cupertino, CA 95014 | of my employer, Apple Computer Inc. - ------------------------- From: Dwayne@kcbbs.gen.nz (Dwayne Knowles) Subject: Calling SndDoCommand at interrupt ti Date: 31 Jan 92 22:31:50 GMT Organization: Kappa Crucis Unix BBS, Auckland, New Zealand > You can issue another bufferCmd within your callBackProc. That's > exactly what QuickTime does. could you please post a list of commands that can be used with sndDoCommand at interrupt time please? thanks. --------------------------- From: tiktin@dogmatix.cs.uoregon.edu (David Mark Tiktin) Subject: Making Folders Organization: University of Oregon Date: Fri, 24 Jan 1992 00:17:00 GMT I find lots of information on doing things to files, but nothing about doing things to folders. Can I create folders and delete them from within a THINK C application? (I'm particularly interested in doing this in the context of an AppleShare file server.) Thanks, David Tiktin tiktin@cs.uoregon.edu - ------------------------- From: leonardr@ccs.itd.umich.edu Subject: Making Folders Date: 24 Jan 92 20:29:30 GMT Organization: Campus Computing Sites, University of Michigan-Ann Arbor In article <TIKTIN.92Jan23161700@dogmatix.cs.uoregon.edu> tiktin@dogmatix.cs.uoregon.edu (David Mark Tiktin) writes: > >I find lots of information on doing things to files, but nothing about >doing things to folders. Can I create folders and delete them from within >a THINK C application? (I'm particularly interested in doing this in the >context of an AppleShare file server.) > Check out Inside Macintosh Volume IV page 146, the DirCreate routine will allow you to create a folder. If you want a higher level routine, there is an HDirCreate which takes a vRefNum, dirID, fName triplet which works quite nicely and if you are using System 7 only, then see FSpDirCreate. These will work on ANY Mac mountable volume.( As to deleting a folder, deleting the folder itself is easy, but the trick is that befre you can delete the folder you MUST delete all of it's contents first - that entails a directory/tree walk with deletions of each file/folder encountered. Not difficult, just tedious. ~ If you are doing stuff with AppleShare, you should look into the calls related to folder permissions to make sure you don't try to delete folders/files that you don't have permission to - or when you create a folder that you give it the correct permissions (there is a default). -- - --------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu Director of Advanced Technology AppleLink: MACgician Aladdin Systems, inc. GEnie: MACgician --------------------------- From: jkeegan@cs.ulowell.edu (Jeff Keegan) Subject: Putting the drive to sleep on a powerbook Date: 23 Jan 92 23:17:14 GMT Organization: University of Lowell Computer Science, Lowell MA Hi.. I was wondering if there is a way to tell the system (from C) to put the drive into sleep mode while still keeping the machine alive.. Clicking on the sleep button on the battery DA and then waking it up with a key produces a loud click (on the Powerbook 140), and that can be very disturbing in a noise-sensitive situation. Any ideas? I've been going by the Power Manager section of Inside Macintosh VI, is there a more up to date source of info? ..Jeff Keegan /=======================================> Cow Poetry <=====================\ |Jeff Keegan | The distant hills call to me. | |jkeegan@cs.ulowell.edu | Their rolling waves seduce my heart. | |-----------------------| Oh, how I want to graze in their lush valleys. | |___ | | | ___| | | Oh, how I want to run down their green slopes. | | | | | | | Alas, I cannot. | | \ | | |___ | | Damn the electric fence! | | \| | | | | Damn the electric fence! | \==========================================================================/ - ------------------------- From: stevec@Apple.COM (Steve Christensen) Subject: Putting the drive to sleep on a powerbook Date: 25 Jan 92 02:47:28 GMT Organization: Apple Computer Inc., Cupertino, CA jkeegan@cs.ulowell.edu (Jeff Keegan) writes: >Hi.. I was wondering if there is a way to tell the system (from C) to put the >drive into sleep mode while still keeping the machine alive.. Clicking on the >sleep button on the battery DA and then waking it up with a key produces a loud click (on the Powerbook 140), and that can be very disturbing in a >noise-sensitive situation. Any ideas? I've been going by the Power Manager >section of Inside Macintosh VI, is there a more up to date source of info? There is no programming interface to do this, and it requires a bit of work to make sure that everything is consistent... steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Christensen Never hit a man with glasses. stevec@apple.com Hit him with a baseball bat. --------------------------- From: tequila@ccwf.cc.utexas.edu (Mario Garcia) Subject: CWindowPtr or WindowPtr ? Date: 24 Jan 92 02:29:25 GMT Organization: The University of Texas at Austin, Austin TX Hello Mac Programmers, I know this might be very simple, but I'm new to Mac programming, so please excuse my ignorance. I'm using Think C 5.0.2 and I'm having the following problem while trying to load a WIND resource: This code produces a compilation error "pointer types do not match" CWindowPtr aWindow; aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L); however, the following works OK aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L); what I don't understand is why I need to use typecasting since GetNewCWindow is supposed to return a CWindowPtr. What is the correct procedure? many thanks in advance. - ----------------------------------------------------------------------------- Mario L. Garcia 1212 Guadalupe Apt. 802 Mathematics Student Austin, TX 78701 The University of Texas at Austin (512)479-8621 e-mail tequila@ccwf.cc.utexas.edu - ----------------------------------------------------------------------------- - ------------------------- From: tagreen@bronze.ucs.indiana.edu (Todd Green) Subject: CWindowPtr or WindowPtr ? Date: 24 Jan 92 14:49:28 GMT Organization: Indiana University In article <65530@ut-emx.uucp> tequila@ccwf.cc.utexas.edu (Mario Garcia) writes > > CWindowPtr aWindow; > > aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L); >what I don't understand is why I need to use typecasting since GetNewCWindow >is supposed to return a CWindowPtr. What is the correct procedure? Look at Windows.h and you'll see that it is NOT supposed to return a CWindowPtr: pascal WindowPtr GetNewCWindow(short windowID,void *wStorage, WindowPtr behind) = 0xAA46; It returns a WindowPtr which is what you should declare your window structure as. I think there is a technote or at least it's mentioned somewhere that you should declare a "color" window as a WindowPtr, (unfortunately) don't always trust IM. Hope that helps, -- Internet: tagreen@bronze.ucs.indiana.edu NeXTMail: tagreen@cheyenne.ucs.indiana.edu BitNet: tagreen@iubacs.bitnet - ------------------------- From: timm@void.ncsa.uiuc.edu (Coffee Junkie) Subject: CWindowPtr or WindowPtr ? Date: 24 Jan 92 16:31:26 GMT Organization: University of Illinois at Urbana tagreen@bronze.ucs.indiana.edu (Todd Green) writes: >In article <65530@ut-emx.uucp> tequila@ccwf.cc.utexas.edu (Mario Garcia) writes >> >> CWindowPtr aWindow; >> >> aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L); >>what I don't understand is why I need to use typecasting since GetNewCWindow >>is supposed to return a CWindowPtr. What is the correct procedure? >Look at Windows.h and you'll see that it is NOT supposed to return a >CWindowPtr: >pascal WindowPtr GetNewCWindow(short windowID,void *wStorage, > WindowPtr behind) = 0xAA46; >It returns a WindowPtr which is what you should declare your window >structure as. I think there is a technote or at least it's mentioned >somewhere that you should declare a "color" window as a WindowPtr, >(unfortunately) don't always trust IM. Well, you may not want to do this to avoid having to coerce 'port' to the correct type all the time. If you really want to avoid the coercion problem, define a duplicate set of headers in "Windows.h" with CWindowPtr in place of WindowPtr all pointing to the same respective traps. This will work because Inside Mac V claims that "all routines which accept a WindowPtr will now accept a CWindowPtr". -- Tim McClarren (timm@ncsa.uiuc.edu)|"I'm countin' down to the day deservin' Mac Programmer (217)244-0015 | Fittin' for a king I'm waitin' for the NCSA/STG@University of Illinois | time when I can Get to Arizona" PE Apoc 91 - ------------------------- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy) Subject: CWindowPtr or WindowPtr ? Date: 24 Jan 92 16:09:33 GMT Organization: Kalamazoo College tequila@ccwf.cc.utexas.edu (Mario Garcia) writes: >Hello Mac Programmers, Hi! >This code produces a compilation error "pointer types do not match" > CWindowPtr aWindow; > aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L); >however, the following works OK > aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L); >what I don't understand is why I need to use typecasting since GetNewCWindow >is supposed to return a CWindowPtr. Not according to my header files, and probably yours too. GetNewCWindow returns a WindowPtr. Since "Inside Macintosh is the Old Testament, and the MPW headers are the New," you might want to pencil in the change in your copy of IM5. It's pretty immaterial, since WindowPtr and CWindowPtr are pretty much interchangeable. -- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy - ------------------------- From: ksand@apple.com (Kent Sandvik) Subject: CWindowPtr or WindowPtr ? Date: 28 Jan 92 09:07:24 GMT Organization: MacDTS Mongols In article <1992Jan24.160933.26526@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes: > > tequila@ccwf.cc.utexas.edu (Mario Garcia) writes: > > >Hello Mac Programmers, > > Hi! > > >This code produces a compilation error "pointer types do not match" > > CWindowPtr aWindow; > > aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L); > >however, the following works OK > > aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L); > >what I don't understand is why I need to use typecasting since GetNewCWindow > >is supposed to return a CWindowPtr. > > Not according to my header files, and probably yours too. GetNewCWindow > returns a WindowPtr. Since "Inside Macintosh is the Old Testament, and > the MPW headers are the New," you might want to pencil in the change in > your copy of IM5. > > It's pretty immaterial, since WindowPtr and CWindowPtr are pretty much > interchangeable. Yes, 411 information: pascal WindowPtr GetNewCWindow(short windowID,void *wStorage,WindowPtr behind) = 0xAA46; File {CIncludes}Windows.h And codewise: if(myEnvironment.CheckFunction(TEnvironment::kColorQD)) // get color window by default fDocWindow = GetNewCWindow(resID, NULL, (WindowPtr) -1); else fDocWindow = GetNewWindow(resID,NULL,(WindowPtr) -1); // otherwise a B/W window where fDocWindow is a WindowPtr. They are interchangeable, so I it makes sense to aim for a color window if the system has color QD. Kent Sandvik/Slacker from DTS who really should drive home by now... --------------------------- From: Mike_Diack@kcbbs.gen.nz (Mike Diack) Subject: Trashing menu bar Date: 25 Jan 92 06:04:12 GMT Organization: Kappa Crucis Unix BBS, Auckland, New Zealand Subject line says it all - please , those who are going to tell me not to do it - dont - i'm writing a "slide show" type app in Lightspeed pascal , and the menu bar looks bad on a big projection sdreen. Any hints on how to get rid of the pesky thing would really be appreciated. thanks , Mike. - ------------------------- From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas) Subject: Trashing menu bar Date: 24 Jan 92 19:42:31 GMT Mike_Diack@kcbbs.gen.nz (Mike Diack) writes: >Subject line says it all - please , those who are going to tell me not >to do it - dont - i'm writing a "slide show" type app in Lightspeed >pascal , and the menu bar looks bad on a big projection sdreen. Any >hints on how to get rid of the pesky thing would really be appreciated. >thanks , Mike. I believe that there is a low-mem global called "MBarHeight", you'd probably have to set this to 0, then redraw the menu bar... I'm not sure, but I have done this before... expirement with it, if it doesn't work, then send me some email tonight, and I'll look up my old code. --eric * | Eric W. Douglas Technojock +1 209 897 5785 | * * | I'net: ericd@caticsuf.csufresno.edu ericd@csufres.csufresno.edu | * * | AppleLink: STUDIO.D Compuserve: 76170,1472 AOL: EWDOUGLAS | * ____________________________________________________________________________ - ------------------------- From: Mike_Diack@kcbbs.gen.nz (Mike Diack) Subject: Menu Bar Gone ! Date: 26 Jan 92 12:21:41 GMT Organization: Kappa Crucis Unix BBS, Auckland, New Zealand Thanks to all of you who replied both via EMAIL and posting to my request for info on zapping the menu bar - it is now been duly exterminated and my little slide show looks so much better:-):-):-) Cheers , Mike - ------------------------- From: Romain.Vignes@fifi.univ-lyon1.fr Subject: Trashing menu bar Date: 27 Jan 92 11:56:24 GMT Mike_Diack@kcbbs.gen.nz (Mike Diack) writes: >Subject line says it all - please , those who are going to tell me not >to do it - dont - i'm writing a "slide show" type app in Lightspeed >pascal , and the menu bar looks bad on a big projection sdreen. Any >hints on how to get rid of the pesky thing would really be appreciated. >thanks , Mike. There is a lot of hints, but this one is very simple: - Save the menu bar height (MBarHeight global) - set this height to zero - set the correct window position... You can now draw what you want on the entire screen. BUT: Don't forget to restore the old value at the end of the slide-show... Bye, Romain Vignes roms@fifi.univ-lyon1.fr --------------------------- From: ptrubey@netcom.COM (Phil Trubey) Subject: Command Mac database format? Date: 24 Jan 92 06:31:00 GMT Organization: Netcom - Online Communication Services (408 241-9760 guest) With all the nice program to program integration technologies available for the Mac (PPC, Apple Events, Publish and Subscribe, etc), has anyone thought of a strategy to integrate - even at a simple level - simple database information for multiple programs? For example, wouldn't it be nice if XYZ's calendar program, and PRQ's address book program, and MNO's label printing program could all use the same repository to access and modify their data? Sure, different programs would have different fields, but some fields are common and the objects they refer to are common. Just a thought... -- Phil Trubey | ptrubey@netcom.com Systemhouse Inc. | 415-243-8100 (day) - ------------------------- From: d88-jwa@hemul.nada.kth.se (Jon W{tte) Subject: Command Mac database format? Date: 24 Jan 92 19:56:03 GMT Organization: Royal Institute of Technology, Stockholm, Sweden .COM> ptrubey@netcom.COM (Phil Trubey) writes: For example, wouldn't it be nice if XYZ's calendar program, and PRQ's address book program, and MNO's label printing program could all use the same repository to access and modify their data? Sure, different The Apple Event Registry has a core suite and a few extended suites of AppleEvents that can be used for exchanging data transparently. This, and the Object Support Library (which lets you parse things like "select the third record containing no wovel" sort of easily) will probably present an understandable and comprehensive data exchange mechanism. Not to mention XTND. -- This Signature is distributed under the conditions of the Signature License, available at a fee from h+@nada.kth.se (Jon W{tte) Reading the Signature implies that you accept to be bound by the terms in said License. Should you not agree on any of these terms, you must return the Signature unread to me. --------------------------- From: plg@mlutv.link.diab.se (Patric Ljung) Subject: Sockets lib wanted for MacTCP Date: 23 Jan 92 16:52:07 GMT Organization: Diab Data AB - ----------------------------------------------------- As far as I know there are three sockets lib available. Two of these are PDs and one is from Novell. - TCPort from Novell - PD from FTP Site madhaus.utcs.utoronte.ca - PD from FTP Site net-dist.mit.edu The one I have looked at is the one from net-dist.mit.edu. This lib was hardly complete. It did know handle select for TCP-sockets, since driver up-calls not was used for TCP-sockets. When I changed the code so up-calls would be used I managed to have the Mac bombing me when I closed the connection. The up-call I received upon close contained garbage. Then I just ignored the 'last' up-call. Neither the Mac nor I was happy about that. Various Bus errors and invalid instructions was the result of that simple action. So, is there anyone who has solved this problem, or knows if there are any other sockets library that handles polling select-calls, i.e. asynchronus up-calls with tcp-streams. I've been trying to get some information from a Novell retailer about TCPort from Novell without success. Someone told me that Novell dropped this product. Is this product in that case available anywhere else? Please send me any information on sockets library for MacTCP. Please also send a mail to plg@diab.se since I'm not reading news to often. mvh / Patric - ------------------------- From: mcmath@csb1.nlm.nih.gov (Chuck McMath) Subject: Sockets lib wanted for MacTCP Date: 24 Jan 92 16:43:41 GMT Organization: MSD There is information on using MacTCP in the Spring 1991 issue of d e v e l o p magazine (it's on the developer CD-ROMs). I believe it is Issue 6. The article presents a lot of good info, and has complete source code to two TCP/IP applications - one simple and one quite complex. The TCP code could be used as the basis for a library. I am using it in an app I am writing, and the code DOES work! :) If you need more info on d e v e l o p then try this: phone orders: 1-800-545-9364 cost is $30 for 4 issues; includes a CD-ROM with each issue. Each CD-ROM contains code and articles for ALL previous issues, plus other developer junk. -- chuck mcmath - ------------------------- From: time@ice.com (Tim Endres) Subject: Sockets lib wanted for MacTCP Date: 25 Jan 92 16:18:52 GMT Organization: ICE Engineering, Inc. In article <1992Jan24.164341.3882@nlm.nih.gov> (comp.sys.mac.comm,comp.sys.mac.programmer,comp.sys.mac.wanted`), mcmath@csb1.nlm.nih.gov (Chuck McMath) writes: > There is information on using MacTCP in the Spring 1991 issue of > d e v e l o p magazine (it's on the developer CD-ROMs). I believe it is Issue > 6. The article presents a lot of good info, and has complete source code > to two TCP/IP applications - one simple and one quite complex. The > TCP code could be used as the basis for a library. I am using it io What in the world does this have to do with a socket library? Tim Endres -> time@ice.com -or- uupsi!tbomb!time ICE Engineering, 8840 Main Street, Whitmore Lake MI. 48189 Voice (313) 449 8288 FAX (313) 449 9208 - ------ USENET: A slow moving self parody..... ph - ------------------------- From: jxyh@lanl.gov (John H. Hall) Subject: Sockets lib wanted for MacTCP Date: 28 Jan 92 01:29:33 GMT Organization: Los Alamos National Laboratory In article <1203@diab.se>, plg@mlutv.link.diab.se (Patric Ljung) writes: > > ------------------------------------------------------- > > As far as I know there are three sockets lib available. Two of these are PDs and one is from Novell. > > - TCPort from Novell > - PD from FTP Site madhaus.utcs.utoronte.ca > - PD from FTP Site net-dist.mit.edu > > The one I have looked at is the one from net-dist.mit.edu. This lib was hardly complete. It did know handle select for TCP-sockets, since driver up-calls not was used for TCP-sockets. When I changed the code so up-calls would be used I managed to have the Mac bombing me when I closed the connection. The up-call I received upon close contained garbage. Then I just ignored the 'last' up-call. > Neither the Mac nor I was happy about that. Various Bus errors and invalid instructions was the result of that simple action. > > > So, is there anyone who has solved this problem, or knows if there are any other sockets library that handles polling select-calls, i.e. asynchronus up-calls with tcp-streams. > > I've been trying to get some information from a Novell retailer about TCPort from Novell without success. Someone told me that Novell dropped this product. Is this product in that case available anywhere else? > > > Please send me any information on sockets library for MacTCP. Please also send a mail to plg@diab.se since I'm not reading news to often. > > mvh / Patric > > The TCPort package from Novell does handle your requirements regarding select, etc. It works with TCport or MacTCP. Future releases of the socket library will only support MacTCP. The current release is Novell's TCPort Developer's Kit, version 2.2 which is System 7.0 compatible. The purchase price of the developer's kit is separate from the licensing fee. For my purposes, porting some local tools from unix, the socket library has been enormously useful. John Hall --------------------------- From: mbp@generali.harvard.edu (Mark B Palmerino) Subject: Quickdraw - PICT question Date: 24 Jan 92 16:56:48 GMT Organization: Harvard University, Cambridge, MA I've got a question about quickdraw, pict files and printing on a printer. What I want to do is draw two circles that are filled with two different patterns. I can do that. When the circles overlap, I want the two different patterns to be seen. I can do that by: PenMode(patOr); (Oh, BTW, I'm programming under MPW using C++) Actually, I do all my drawing into a Picture (using OpenPicture and ClosePicture) and then use DrawPicture to write it to a window. All of this works fine and my fill patterns overlap like I want. However, when I print the picture, the fills do not overlap (the fill in the last drawn circle is there but this blocks out the part of the other circle underneath). Also, if I save the Picture to a PICT file and import it into another application (e.g., Persuasion) and then print it out I also do NOT get the proper overlaying effect that I want. Is there a trick that I'm missing? Any pointers would be greatly appreciated. Much thanks in advance. -- Mark Palmerino mbp@wjh12.harvard.edu Voice: (617) 345-9500 - ------------------------- From: jcav@quads.uchicago.edu (JohnC) Subject: Quickdraw - PICT question Date: 24 Jan 92 18:05:51 GMT Organization: The Royal Society for Putting Things on Top of Other Things In article <1992Jan24.165648.8925@burrhus.harvard.edu> mbp@generali.harvard.edu (Mark B Palmerino) writes: >I've got a question about quickdraw, pict files and printing on a >printer. > >What I want to do is draw two circles that are filled with two different >patterns. I can do that. When the circles overlap, I want the two >different patterns to be seen. I can do that by: > >PenMode(patOr); > >All of this works fine and my fill patterns overlap like I want. However, >when I print the picture, the fills do not overlap (the fill in the last >drawn circle is there but this blocks out the part of the other circle >underneath). Also, if I save the Picture to a PICT file and import it >into another application (e.g., Persuasion) and then print it out I also >do NOT get the proper overlaying effect that I want. patOr mode doesn't work on Postscript printers. This stems from part of the definition of the Postscript imaging model, which states that all marks drawn on the page completely replace anything that was already there. The only way around this would be to draw your two circles into a bitmap, where the effect would appear correctly, then use _CopyBits to get the image onto the printed page. Of course, if you're not using a Postscript printer than something else is going on. -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953 B0 f++ c+ g+ k s+(+) e+ h- pv | Chicago, IL 60637 --------------------------- From: shall@yoda.eecs.wsu.edu (Sean Hall - CS460) Subject: Auto Pop (why?) Organization: Washington State University Date: Fri, 24 Jan 92 18:02:15 GMT I was just wondering, why would a compiler use the Auto Pop bit in the trap words? I see WHAT it is doing, I just can't seem to see any benefit of doing it. Sean Hall - ------------------------- From: tecot@momenta.com (Ed Tecot) Subject: Auto Pop (why?) Date: 28 Jan 92 00:13:25 GMT Organization: Momenta Corporation shall@yoda.eecs.wsu.edu (Sean Hall - CS460) writes: >I was just wondering, why would a compiler use the Auto Pop bit in the >trap words? I see WHAT it is doing, I just can't seem to see any benefit >of doing it. It wouldn't. The auto pop bit was used before there were compilers that could generate trap words directly. Since the only other alternative was a collection of library routines, the auto pop bit was used to reduce the code size of each routine by 2 bytes and speed up the procedure call a tiny bit. _emt --------------------------- From: jkroll@orac.Corp.Sun.COM (Jeff Kroll) Subject: MS Mail XCMDs or Externals? Date: 24 Jan 92 18:55:18 GMT Organization: Sun Microsystems Inc., Mountain View, CA Looking for MS Mail HyperCard XCMDs or 4D Externals... Seems to me I saw an unfinished suite of XCMDs for MS Mail about a year ago and a friend of mine is now looking for them (or the finished suite)... any and all help is much appreciated. Thanks, Jeff - ------------------------- From: stinky@halcyon.com (tom benedict) Subject: MS Mail XCMDs or Externals? Date: 24 Jan 92 23:25:43 GMT Organization: The 23:00 News and Mail Service jkroll@orac.Corp.Sun.COM (Jeff Kroll) writes: > Looking for MS Mail HyperCard XCMDs or 4D Externals... > > Seems to me I saw an unfinished suite of XCMDs for MS Mail about a year ago a > > Thanks, > Jeff Microsoft has XCMDs for MSMail. Call their customer service for the kit. I think it's reasonably priced. BTW, the MSMail forms builder is a HyperCard stack! Tom Benedict HyperCard Developer stinky@halcyon.com /es -- The 23:00 News and Mail Service - +1 206 292 9048 - Seattle, WA USA PEP, V.32, V.42bis +++ A Waffle Iron, Model 1.64 +++ --------------------------- From: trn@warper.jhuapl.edu (Tony Nardo) Subject: ERead() completion woes Date: 24 Jan 92 18:02:59 GMT After puzzling over this one for a while, I figured I'd see if anyone else had run into a similar condition... Background: MAC IIci running System 7.0 MPW 3.2, C source Shiva EtherPort II card .ENET driver sources are being compiled as a Tool I am currently attempting to read broadcast packets off the Ethernet using the .ENET driver and support routines for same. I'm observing three classes of conditions: two expected, one unexpected. - If I use the ERead() function synchronously, or asynchronously without a completion address in my rParams.EParms1.ioCompletion field, ERead() properly retrieves the packet; - If I use the ERead() function asynchronously with a completion address specified, then deliberately abort the read request with an EDetach() call prior to receipt of a packet, my completion routine is triggered properly and rParams.EParms1.ioStatus takes on the expected value of -1105; but... - If I use the ERead() function asynchronously with a completion address specified, then wait for packet receipt, then one of two things will happen: - if I attempt to update a global variable, the variable will not be updated; - however, if I attempt to print a brief message in the completion routine, the system crashes. The pertinent pieces of code... /* * [include files] */ void completion(); static short flag = 0; main() { /* * [find NuBus Ethernet card, open it] * [attach to protocol type 0, using default protocol handler] * [set up ERead parameters...] */ rParams.EParms1.ioCompletion = (ProcPtr)completion; /* * [issue ERead()] * [wait for rParams.EParms1.ioStatus to change from 1] * [print details of packet received] * [issue EDetach()] */ printf( "flag: %d\n", flag ); } void completion() { flag = 1; /* updated only if EDetach() sends control here */ /*** printf( "received packet\n" ); /**/ /* above line crashes Mac if compiled and if packet received, but prints properly if compiled and EDetach() aborts the ERead() request */ } Has anyone else run into problems along these lines? Am I missing something obvious? Any help would be apprieciated. -- Tony Nardo, INET: trn@warper.jhuapl.edu, trn@aplcen.apl.jhu.edu Johns Hopkins Univ./APL UUCP: {backbone!}mimsy!aplcen!trn - ------------------------- From: jcav@quads.uchicago.edu (JohnC) Subject: ERead() completion woes Date: 24 Jan 92 20:01:34 GMT Organization: The Royal Society for Putting Things on Top of Other Things In article <trn.696276179@warper.jhuapl.edu> trn@warper.jhuapl.edu (Tony Nardo) writes: > - If I use the ERead() function asynchronously with a completion > address specified, then wait for packet receipt, then one of two > things will happen: > - if I attempt to update a global variable, the variable will > not be updated; > - however, if I attempt to print a brief message in the > completion routine, the system crashes. If you are going to manipulate global variables in interrupt-time code (into which category an asynchronous completion routine certainly falls) you'll have to make sure your application's A5-world is correctly set up. There are two routines included with Mac development systems that enable you to do this. They are SetA5 and SetCurrentA5. These routines are documented in the Memory Manager chapter of Inside Mac 6, although they were originally described much earlier in a tech note. Here are some quick definitions: FUNCTION SetCurrentA5:longint; --returns current value of A5 register --sets A5 equal to contents of low-memory global CurrentA5 FUNCTION SetA5(newA5:longint):longint; --sets A5 equal to the specified newA5 value --returns previous value of A5 What you want to do is declare a new parameter block struct which is a superset of the .ENET driver parameter block, containing at least one extra field at the end, a long word to hold your application's A5 value. Before making the asynchronous call, use SetCurrentA5 to fill it with the correct value. Inside your completion routine, before doing anything else, call SetA5, passing the contents of this field, and saving the return value in a local variable. Before returning out of your completion routine, call SetA5 with the value returned by the first SetA5 call. This should solve the problem. Of course, there may be additional nasties caused by the way certain optimizing compilers play with the processor registers, but that's covered in a recent tech note, the number of which I can't recall. Good luck. -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953 B0 f++ c+ g+ k s+(+) e+ h- pv | Chicago, IL 60637 - ------------------------- From: markw@wc.novell.com (Mark Wittenberg) Subject: ERead() completion woes Date: 25 Jan 92 01:22:58 GMT Organization: Novell, Inc. In <trn.696276179@warper.jhuapl.edu> trn@warper.jhuapl.edu (Tony Nardo) writes: > - If I use the ERead() function asynchronously with a completion > address specified, then wait for packet receipt, then one of two > things will happen: > - if I attempt to update a global variable, the variable will > not be updated; > - however, if I attempt to print a brief message in the > completion routine, the system crashes. >-- >Tony Nardo, INET: trn@warper.jhuapl.edu, trn@aplcen.apl.jhu.edu > Johns Hopkins Univ./APL UUCP: {backbone!}mimsy!aplcen!trn Don't forget that the completion routine is called at interrupt time; you don't get to touch globals or call routines unless you set up A5, and you can't call routines such as printf at all. Yes, if you're sure calling a specific routine will be pc-relative, and you're sure that the routine won't touch globals, or qd vars, etc, and you're sure that the routine either couldn't possible be already executing or at least that it's re-entrant, and your sure that any routine it calls guarantees the same things [apply transitive closure here], then you don't need to set up A5 before calling it - generally, you need to set up A5 first. (Sorry for the tortured English of that sentence). Mark - - Mark Wittenberg Voice: (510) 975-4512 Novell, Inc. Internet: markw@wc.novell.com 1340 Treat Blvd. Suite 500 UUCP: uunet!kinetics!markw Walnut Creek, CA 94596 AppleLink: NOVELL.WCENG FAX: (510) 938-2562 --------------------------- End of C.S.M.P. Digest **********************